package com.lrs.java.j2se_self.net;
import java.io.*;
import java.net.*;

public class TestUDPClientLong {
	public static void main(String[] args){
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		DataOutputStream dos = new DataOutputStream(baos);
		try{
			dos.writeLong(1000L);
			byte[] b = baos.toByteArray();
			DatagramPacket dp = new DatagramPacket(b,b.length,new InetSocketAddress("127.0.0.1",6790));
			DatagramSocket ds = new DatagramSocket(9999);
			ds.send(dp);
			ds.close();
		}catch(IOException e){
			System.out.println("the System input is error!");
			e.printStackTrace();
		}
	}
}
